package com.chenjt.jvm.first.ten_GC;

import java.util.ArrayList;
import java.util.Date;
import java.util.Scanner;

/**
 * 注释：
 *
 * @author chenjt
 * @date 2025/6/14 14:36
 */
public class GCRootsTest {

    public static void main(String[] args) {
        ArrayList<Object> numList = new ArrayList<>();
        Date birth = new Date();

        for (int i = 0; i < 100; i++) {
            numList.add(String.valueOf(i));

            try {
                Thread.sleep(10);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }

        System.out.println("数据添加完毕，请操作：");
        new Scanner(System.in).next();
        numList = null;
        birth = null;

        System.out.println("numList、birth已置空，请操作：");
        new Scanner(System.in).next();

        System.out.println("结束");


    }

}
